# -*- coding: utf-8 -*-
# @Time    : 2021/11/21 13:39
# @Author  : super


class Student():

	def __init__(self):
		self.__age = 0


	def get_age(self) :
		print("获取属性啦")
		return self.__age


	def set_age(self, new_age) :
		print("设置属性啦")
		if new_age >= 0 and new_age <= 130 :
			self.__age = new_age
		else :
			print("成精啦")

	age = property(get_age, set_age)

stu = Student()
print(stu.age)
stu.age = 20
print(stu.age)